Skip to content

feat(scoring): add Evergreen playstyle & fix active_years calculation bug - #116

Open
KrishnaX12 wants to merge 5 commits into
Younesfdj:masterfrom
KrishnaX12:feat/evergreen-playstyle
Open

feat(scoring): add Evergreen playstyle & fix active_years calculation bug#116
KrishnaX12 wants to merge 5 commits into
Younesfdj:masterfrom
KrishnaX12:feat/evergreen-playstyle

Conversation

@KrishnaX12

@KrishnaX12 KrishnaX12 commented Aug 16, 2026

Copy link
Copy Markdown

Description

This PR introduces the new Evergreen playstyle to reward developers for long-term consistency, and also patches a critical bug in the engine's active_years scoring logic.

Changes Made

  1. Evergreen Playstyle (lib/scoring/playstyles.ts):
    • Added the Evergreen playstyle using the leaf (🍃) icon.
    • Rewards developers for consistent yearly activity (Base tier: 5 active years, Elite tier: 10 active years).
  2. Fixed active_years Logic (lib/github/signals.ts):
    • The Bug: active_years was previously being estimated by looking at the creation and push timestamps of the user's top 100 repositories. This severely undercounted developers (like Linus Torvalds) who commit heavily over many years but only to a small handful of repositories.
    • The Fix: Completely rewrote the active_years logic to calculate directly from the contributionYears payload, ensuring every single calendar year with at least 1 contribution is perfectly counted.
  3. Cache Invalidation (lib/scout.ts):
    • Bumped CACHE_VERSION to v3 to globally bust the Redis cache and force all profiles to recalculate their true active_years when this deploys to production.
image

@KrishnaX12 KrishnaX12 changed the title feat(scoring): add Evergreen playstyle for active years feat(scoring): add Evergreen playstyle & fix active_years calculation bug Aug 17, 2026
@KrishnaX12
KrishnaX12 force-pushed the feat/evergreen-playstyle branch from 6e0da07 to c4490e1 Compare August 17, 2026 08:39
@KrishnaX12 KrishnaX12 changed the title feat(scoring): add Evergreen playstyle & fix active_years calculation bug feat(scoring): add Evergreen playstyle Aug 17, 2026
@KrishnaX12 KrishnaX12 changed the title feat(scoring): add Evergreen playstyle feat(scoring): add Evergreen playstyle & fix active_years calculation bug Aug 17, 2026

@KrishnaX12 KrishnaX12 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Younesfdj Hey! I updated this PR with the new Evergreen playstyle to reward long-term consistency. I also patched a major bug in the active_years scoring logic that was severely undercounting veteran developers (like Linus).

Tested locally and bumped the cache. Screenshot attached of it working perfectly on Torvalds's profile! Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant